def fun3(a, n):
    ls = [int(str(a) * i) for i in range(1, n + 1)]
    return sum(ls)
a, n = eval(input("输入a和n[用逗号分隔]:"))
s = fun3(a, n)
print(f"若a={a}，n={n}，则s=a+aa+aaa+...+aaa...aaa={s}")